Product : ISaGRAF 3.x

Date    : 22 September 1999

File    : MultiDelayedOn-LineModifications.htm

Subject : Multi Delayed on line modification may cause a fatal error

Keywords: on-line modification - on-line change - update -

          realize update

____________________________________________________________________

With following sequence:

- Download an application

- Make on line modification (File/update application)

with immediate update

- Make another on line modification with immediate update

- Make another on line modification with delayed update

- Make another on line modification with delayed update

Then you may get an unknown tic code.

In worst case the target crashes because in fact the unknown tic code

is due to an internal memory problem and the target may no more

be in a stable state even if it seems to still works after another

download.

 

In fact the problem is due to an overlap of space SPC_MF2(5).

This one is being used for the current modified application

(after the second on line modif with immediate update).

After the second on line modif with delayed update it is

deleted (This generally flush memory contents, and explain

the unknown tic code) and re-created (maybe elsewhere in memory)

for the new modif. Then it corrupts current running application.

 

A quick correction is as following:

-----------------------------------

File: TATS0LV5.c

Function: void lv5_load(uchar *ques, uchar *ans)

 

void lv5_load(uchar *ques, uchar *ans)

{

...

 

switch(typ)

{

*************** Code to Replace **************************

#ifdef DEF_MODIF

case C_MDD:

case C_MDF:

if (SYST->start == START_OK)

{

if (sys_link_spc(LAST_SLAVE, SPC_MF1, &add)) num_space = SPC_MF1;

else num_space = SPC_MF2;

if (sys_creat_spc(LAST_SLAVE, num_space,&add, size)) sys_err(29,0);

else err = lv4_transfert((uchar *)add, size);

}

break;

#endif

*************** End Code to Replace ***********************

 

*************** Replace with code *************************

#ifdef DEF_MODIF

case C_MDD:

case C_MDF:

if (SYST->start == START_OK)

{

if (sys_link_spc(LAST_SLAVE, SPC_MF1, &add)) num_space = SPC_MF1;

else if (sys_link_spc(LAST_SLAVE, SPC_MF2, &add)) num_space = SPC_MF2;

else num_space = 0;

 

if (num_space==0 || sys_creat_spc(LAST_SLAVE, num_space,&add, size)) sys_err(29,0);

else err = lv4_transfert((uchar *)add, size);

}

break;

#endif

*************** End Replace with code **********************

 

...

}

 

Then you can no more do two consecutive on line modif with

delayed update without doing a realize update

____________________________________________________________________

Copyright © 1996-2009 ICS Triplex ISaGRAF Inc. All rights reserved.